package com.kude.service;

import java.io.IOException;

import com.kude.dao.PropertyDAO;

public class PropertyService {

	public static String INTRODUCTION = "/com/kude/base/introduction.txt";
	public static String CONSUMPTION = "/com/kude/base/consumption.txt";
	public static String CONTACT_US = "/com/kude/base/contactus.txt";
	public static String TRAFFIC = "/com/kude/base/traffic.txt";
	public static String RECRUITMENT = "/com/kude/base/recruitment.txt";

	public PropertyDAO pd;

	public PropertyService() {
		pd = new PropertyDAO();
	}

	public String getIntroduction() throws IOException {
		String main = pd.readData(INTRODUCTION);
		return main;
	}

	public void setIntrodction(String introduction) throws IOException {
		pd.writeData(introduction, INTRODUCTION);
	}

	public String getConsumption() throws IOException {
		String consumption = pd.readData(CONSUMPTION);
		return consumption;
	}

	public void setConsumption(String consumption) throws IOException {
		pd.writeData(consumption, CONSUMPTION);
	}

	public String getContactUs() throws IOException {
		String contactUs = pd.readData(CONTACT_US);
		return contactUs;
	}

	public void setContactUs(String contactUs) throws IOException {
		pd.writeData(contactUs, CONTACT_US);
	}

	public String getTraffic() throws IOException {
		String traffic = pd.readData(TRAFFIC);
		return traffic;
	}

	public void setTraffic(String traffic) throws IOException {
		pd.writeData(traffic, TRAFFIC);
	}

	public String getRecruitment() throws IOException {
		String recruitment = pd.readData(RECRUITMENT);
		return recruitment;
	}

	public void setRecruitment(String recruitment) throws IOException {
		pd.writeData(recruitment, RECRUITMENT);
	}
}
